package com.eastedu.superise.handler.question.handler.answerparentheses;

import lombok.Getter;

import java.util.function.Predicate;

/**
 * The enum Match type.
 *
 * @author luozhenzhong
 */
@Getter
public enum MatchType {
    /**
     * The Strict.
     */
    STRICT("严格模式", (stem) -> stem.getCount().get() == 1),
    /**
     * The Ignore answer order.
     */
    IGNORE_ANSWER_ORDER("多个括号", (stem) -> stem.getCount().get() > 0),
    ;

    /**
     * -- GETTER --
     *  Gets name.
     *
     */
    private final String name;
    /**
     * -- GETTER --
     *  Gets predicate.
     *
     */
    private final Predicate<ContentSummary> predicate;

    MatchType(String name, Predicate<ContentSummary> predicate) {
        this.name = name;
        this.predicate = predicate;
    }

}
